home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJLSR200.ZIP / src / libc / dos / process / spawnvpe.c < prev   
Encoding:
C/C++ Source or Header  |  1995-11-13  |  517 b   |  22 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <libc/stubs.h>
  3. #include <process.h>
  4. #include <errno.h>
  5. #include <libc/unconst.h>
  6. #include <libc/dosexec.h>
  7.  
  8. int spawnvpe(int mode, const char *path, char *const argv[], char *const envp[])
  9. {
  10.   char rpath[300];
  11.   union { char * const *cpcp; char **cpp; } u;
  12.   u.cpcp = envp;
  13.  
  14.   if (!__dosexec_find_on_path(path, u.cpp, rpath))
  15.   {
  16.     errno = ENOENT;
  17.     return -1;
  18.   }
  19.   else
  20.     return spawnve(mode, rpath, argv, envp);
  21. }
  22.